package com.bdqn.controller;

import com.bdqn.pojo.SysRegisteredItem;
import com.bdqn.service.SysRegisteredItemService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@CrossOrigin
@RequestMapping("sri")
public class SysRegisteredItemConrtoller {
    @Autowired
    SysRegisteredItemService sysRegisteredItemService;
    @GetMapping("page")
    public PageInfo<SysRegisteredItem> page(int pageNum, int pageSize, String regItemName, String status){
        PageInfo<SysRegisteredItem> pageInfo=sysRegisteredItemService.page(pageNum,pageSize,regItemName,status);
        return pageInfo;
    }
    @PostMapping("update")
    public int update(@RequestBody SysRegisteredItem form){
        int r=sysRegisteredItemService.update(form);
        return r;
    }
    @PostMapping("insert")
    public int insert(@RequestBody SysRegisteredItem form){
        int r=sysRegisteredItemService.insert(form);
        return r;
    }
}
